{extend name="layout/iframe" /}

{block name="pagecss"}
<link href="__STATIC__/plugins/layui-formSelects/formSelects-v4.css" rel="stylesheet" type="text/css" />
<style>
    .v {
        display: -webkit-flex;
        display: flex;
        flex-direction: column;
    }

    .h {
        display: -webkit-flex;
        display: flex;
        flex-direction: row;
    }
    .v_center {
        display: -webkit-flex;
        display: flex;
        align-items: center; /*垂直居中*/
    }

    .h_center {
        display: -webkit-flex;
        display: flex;
        justify-content: center;
    }

    .h_v_center {
        display: -webkit-flex;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .between {
        display: flex;
        display: -webkit-flex;
        justify-content: space-between;
    }
    .around {
        display: flex;
        display: -webkit-flex;
        justify-content: space-around;
    }
    .text2{
        width: 175px;
    }
    .selectAdd{
        margin-left: 25px;
        margin-right: 25px;
    }
    .layui-icon-edit{
        margin-right: 10px;
    }
</style>
{/block}

{block name="content"}
<div class="layui-card-body layui-layout-admin" style="padding: 15px;">
    <form class="layui-form" action="" lay-filter="component-form-group">
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><span class="required">*</span>可配送区域</label>
        </div>
        <div class="layui-form-item layui-form-text h v_center between">
            <div class="layui-form-mid selectAdd" id="selectAdd">{$datainfo.region}</div>
            <div class="h v_center">
                <a class="layui-btn layui-btn-xs layui-btn-normal edit_area" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
            </div>
        </div>
        <input type="hidden" name="regions" lay-verify="regions" id="selectregions" value="{$datainfo.region}">
        <div class="layui-form-item layui-form-text">
            <div class="layui-col-md6 layui-col-sm6 layui-col-xs6 h v_center between">
                <label class="layui-form-label"><span class="required">*</span>首重</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input text2" id="first_weight" name="first_weight" lay-verify="first_weight" value="{$datainfo.first_weight}" placeholder="" autocomplete="off">
                </div>
                <div class="layui-form-mid"> kg</div>
            </div>
            <div class="layui-col-md6 layui-col-sm6 layui-col-xs6 h v_center between">
                <label class="layui-form-label"><span class="required">*</span>运费</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input text2" name="first_weight_price" lay-verify="first_weight_price" value="{$datainfo.first_weight_price}" placeholder="" autocomplete="off">
                </div>
                <div class="layui-form-mid">元</div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-col-md6 layui-col-sm6 layui-col-xs6 h v_center between">
                <label class="layui-form-label" style="width: 162px"><span class="required">*</span>减去首重后，每续重1kg</label>

            </div>
            <div class="layui-col-md6 layui-col-sm6 layui-col-xs6 h v_center between">
                <label class="layui-form-label"><span class="required">*</span>运费</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input text2" name="continuous_weight_price" lay-verify="continuous_weight_price" value="{$datainfo.continuous_weight_price}" placeholder="" autocomplete="off">
                </div>
                <div class="layui-form-mid">元</div>
            </div>
        </div>
        <input type="hidden" name="id" lay-verify="id" id="editid" value="{$id}">
        <div class="layui-form-item layui-row layui-col-xs12">
            <div class="layui-input-block">
                <div class="layui-footer">
                    <button type="button" class="layui-btn layui-btn-primary close-btn">取消</button>
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="laySave">保存 <i class="layui-icon">&#xe609;</i></button>
                </div>
            </div>
        </div>
    </form>
</div>

<input type="hidden" class="save_url" value="{:url('admin/'.strtolower($model).'/savepost')}">
<input type="hidden" class="select_url" value="{:url('admin/Freight/select')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/js/qiniu/plupload.full.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/qiniu/qiniu.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/qiniu/qiniuConfig.js" type="text/javascript"></script>

<script src="__STATIC__/admin/pages/js/uploadfile.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/freighttemplate.js" type="text/javascript"></script>
{/block}